<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%
    if(request.getParameter("name").equals("pengwei")&&request.getParameter("nickname").equals("pw")){   
        //session.setAttribute("login","ok");   
        session.setAttribute("name",request.getParameter("name"));   
        session.setAttribute("nickname",request.getParameter("nickname"));   
        session.setMaxInactiveInterval(-1); 
        
%>   
<jsp:forward page="main.jsp"/>   
<%   
    }else{   
            out.println("error！");   
}   
%> 